package abacab.ref;

/**
 * Represents a reference to one or many actors
 * 
 * @param <M>
 *          the type of sent message
 */
public interface ActorRef<M> {
	/**
	 * @return the path for the actor(s)
	 */
	String getPath();

	/**
	 * Stop the actor
	 */
	void stop();

	/**
	 * Send a message to the actor(s)
	 * 
	 * @param message
	 *          the message
	 * @param sender
	 *          the sender
	 */
	<N> void send(M message, ActorRef<N> sender);
}